package com.stylefeng.guns.wx.common.persistence.model;

import java.io.Serializable;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author shaohaiting
 * @since 2018-03-19
 */
@TableName("wx_user")
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;

    /**
     * 用户的标识，对当前公众号唯一
     */
	@TableId(value = "openid", type = IdType.INPUT)
	private String openid;
    /**
     * 用户的昵称
     */
	private String nickname;
    /**
     * 用户的性别，值为1时是男性，值为2时是女性，值为0时是未知
     */
	private String sex;
    /**
     * 用户所在城市
     */
	private String city;
    /**
     * 用户所在国家
     */
	private String country;
    /**
     * 用户所在省份
     */
	private String province;
    /**
     * 用户头像，最后一个数值代表正方形头像大小（有0、46、64、96、132数值可选，0代表640*640正方形头像），用户没有头像时该项为空。若用户更换头像，原有头像URL将失效。
     */
	private String headimgurl;
    /**
     * 用户关注时间，为时间戳。如果用户曾多次关注，则取最后关注时间
     */
	@TableField("subscribe_time")
	private Date subscribeTime;
	@TableField("last_login_time")
	private Date lastLoginTime;
    /**
     * 邮箱
     */
	private String email;
    /**
     * 邮箱验证标志(验证的才提醒):0未验证,1已验证
     */
	@TableField("use_flag")
	private String useFlag;
    /**
     * 公众号运营者对粉丝的备注，公众号运营者可在微信公众平台用户管理界面对粉丝添加备注
     */
	private String remark;
	@TableField("create_time")
	private Date createTime;


	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getHeadimgurl() {
		return headimgurl;
	}

	public void setHeadimgurl(String headimgurl) {
		this.headimgurl = headimgurl;
	}

	public Date getSubscribeTime() {
		return subscribeTime;
	}

	public void setSubscribeTime(Date subscribeTime) {
		this.subscribeTime = subscribeTime;
	}

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getUseFlag() {
		return useFlag;
	}

	public void setUseFlag(String useFlag) {
		this.useFlag = useFlag;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Override
	protected Serializable pkVal() {
		return this.openid;
	}

	@Override
	public String toString() {
		return "User{" +
			"openid=" + openid +
			", nickname=" + nickname +
			", sex=" + sex +
			", city=" + city +
			", country=" + country +
			", province=" + province +
			", headimgurl=" + headimgurl +
			", subscribeTime=" + subscribeTime +
			", lastLoginTime=" + lastLoginTime +
			", email=" + email +
			", useFlag=" + useFlag +
			", remark=" + remark +
			", createTime=" + createTime +
			"}";
	}
}
